@page
@{ Layout = "_LayoutApp"; }
@section Styles{
    <style>
        .el-form-item {
            margin-bottom: 0px;
        }
    </style>
}
<div v-if="total>0">
    <div v-for="(paper,index) in list" v-on:click="btnViewClick(paper)">
        <el-card shadow="hover" class="mb-3 rounded-4 shadow-lg">
            <div slot="header">
                <div class="fw-semibold">{{ paper.paper.title }}</div>
            </div>
            <div class="d-flex justify-content-between align-items-center">
                <div>
                    <div class="position-relative">
                        <i class="el-icon-notebook-2 fs-1"></i>
                        <span class="position-absolute top-100 start-50 translate-middle mt-2 fs-6">{{ index+1 }}</span>
                    </div>
                </div>
                <div>
                    <div class="fs-5">
                        <div class="mb-1">总分：{{paper.paper.totalScore}}，及格分：{{paper.paper.passScore}}</div>
                        <div class="mb-1">交卷时间：{{ paper.paper.examEndDateTimeStr }}</div>
                        <div class="mb-1">用时：{{ paper.useTime }}</div>
                        <div>
                            成绩：
                            <span v-if="paper.paper.secrecyScore">
                                <span class="fw-bold">{{ paper.score }}</span>
                            </span>
                            <span v-else class="fw-light text-danger">成绩未公布</span>
                        </div>
                    </div>
                </div>
                <div>
                    <div v-if="paper.paper.secrecyPaperContent">
                        <el-button type="primary" icon="el-icon-view" circle plain></el-button>
                    </div>
                    <el-button v-else disabled circle type="danger"><i class="bi bi-eye-slash-fill"></i></el-button>
                </div>
            </div>
        </el-card>
    </div>
    <div class="my-5 text-center">
        <el-button size="small" icon="el-icon-refresh-right" v-if="list.length>0 && list.length<total" v-on:click="btnLoadMoreClick" :loading="loadMoreLoading">加载更多</el-button>
        <small v-else>没有更多了</small>
    </div>
</div>
<div class="pt-10" v-else>
    <el-empty image="/sitefiles/assets/images/nodata.svg" description="暂无考试记录"></el-empty>
</div>
<div class="py-8"></div>
<div style="position:fixed;left:0;bottom:0;width:100%;" class="text-center mb-5 animate__animated animate__fadeInUp">
    <div class="btn-group">
        <button type="button" class="btn btn-primary rounded-pill" v-on:click="utils.closeLayerSelf"><i class="el-icon-back me-2"></i>返 回</button>
    </div>
</div>
<div style="position:fixed;right:0;top:80%;" class="animate__animated animate__fadeInRightBig">
    <button type="button" class="btn btn-dark rounded-start-pill" v-on:click="scoreDialogVisible=true">
        <i class="bi bi-search text-light"></i>
    </button>
</div>
<template>
    <el-drawer title="成绩查询"
               size="60%"
               :visible.sync="scoreDialogVisible"
               direction="btt">
        <div class="text-center px-2">
            <div class="card border mb-6 mb-md-0 shadow-none">
                <div class="card-body border-top py-3">
                    <div class="text-start">交卷时间</div>
                    <div class="d-flex justify-content-between mt-2 text-dark">
                        <el-date-picker v-model="form.dateFrom"
                                        type="date" class="w-100"
                                        value-format="yyyy-MM-ddTHH:mm:ss.000Z"
                                        placeholder="选择开始日期">
                        </el-date-picker>
                    </div>
                    <div class="d-flex justify-content-between mt-2 text-dark">
                        <el-date-picker v-model="form.dateTo"
                                        type="date" class="w-100"
                                        value-format="yyyy-MM-ddTHH:mm:ss.000Z"
                                        placeholder="选择结束日期">
                        </el-date-picker>
                    </div>
                </div>
                <div class="card-body border-top py-3">
                    <div class="mt-2 text-dark">
                        <div class="my-3">
                            <el-input clearable prefix-icon="el-icon-search" v-model="form.keyWords" placeholder="关键字" class="w-100"></el-input>
                        </div>
                    </div>
                </div>
                <div class="card-body border-top py-3">
                    <el-button type="primary" plain icon="el-icon-search" v-on:click="btnSearchClick">查 询</el-button>
                    <el-button plain icon="el-icon-close" v-on:click="scoreDialogVisible=false">取 消</el-button>
                </div>
            </div>
        </div>
    </el-drawer>
</template>
@section Scripts{
    <script src="/sitefiles/assets/js/app/exam/examPaperScore.js" type="text/javascript"></script>
}